package cz.cacek.ebook.packager;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Toolkit;
import java.net.URL;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.UIManager;

import cz.cacek.ebook.Utils;

//import cz.cacek.ebook.Utils;

/**
 * Base frame for Swing UI
 * @author Tom� Darmovzal [tomas.darmovzal (at) seznam.cz]
 * @author Josef Cacek [josef.cacek (at) atlas.cz]
 * @author $Author: kwart $
 * @version $Revision: 1.5 $
 * @created $Date: 2007/07/13 14:00:32 $
 */
public class PackagerGUIApplic extends JFrame {

	private static final long serialVersionUID = 1051393144301555996L;

	/**
	 * Default constructor.
	 */
	public PackagerGUIApplic() {
		super("EBook Packager (v. " + Utils.VERSION + ")");
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            System.err.println("Cannot set Look&Feel.");
        }

		setSize(450, 600);
		Container contentPane = getContentPane();
		NewEbGui gui = new NewEbGui();
		contentPane.add(new JScrollPane(gui));
		contentPane.add(gui.getJMenuBar(),BorderLayout.NORTH);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//		setLocation(100, 100);
		URL tmpImgUrl = PackagerGUIApplic.class.getClassLoader().getResource("icon.jpg");
		setIconImage(Toolkit.getDefaultToolkit().getImage(tmpImgUrl));
//		pack();
		setVisible(true);
	}

}
